package com.rr.learningdemo.flink;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author RR
 * @date 2021/6/14 22:35
 */
public class MySourceTest {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);

        //从自定义数据库处读取数据
        DataStreamSource<String> dataStream = env.addSource(new MyNoParalleSource());

        dataStream.print();

        env.execute();
    }
}
